package com.sjl.filter;



/**
 * 单一的、系统范围的异常类,继承RuntimeException
 * @author deng
 *
 */
public class BusinessException extends RuntimeException {

	//错误编码
    private String errorCode;
	
    /**
     * 构造函数
     * @param errorCode
     */
    public BusinessException(String errorCode) {
		this.errorCode = errorCode;
	}

    /**
     * 构造函数
     * @param message
     * @param errorCode
     */
	public BusinessException(String message, String errorCode) {
		super(message);
		this.errorCode = errorCode;
	}


	/**
	 * 构造函数
	 * @param message
	 * @param errorCode
	 */
	public BusinessException(String message, String errorCode, String interfaces) {
		super(message);
		this.errorCode = errorCode;
	}
	/**
	 * 构造函数
	 * @param cause
	 * @param errorCode
	 */
	public BusinessException(Throwable cause, String errorCode) {
		super(cause);
		this.errorCode = errorCode;
	}

	/**
	 * 构造函数
	 * @param message
	 * @param cause
	 * @param errorCode
	 */
	public BusinessException(String message, Throwable cause, String errorCode) {
		super(message, cause);
		this.errorCode = errorCode;
	}

    public String getErrorCode() {
        return errorCode;
    }
	
	public BusinessException setErrorCode(String errorCode) {
        this.errorCode = errorCode;
        return this;
    }


}
